package edu.sctu.practice.class01.zhangwang.day2015_10_29.test18;

/**
 * Created by Z_W on 2015/11/1.
 */
public class Car extends Auto {
    private String airConditioner;
    private String CD;

    public Car(int speed, int tireNumber) {
        super(speed, tireNumber);
    }

    public Car(int tireNumber, String color, int weight, int speed, String airConditioner, String CD) {
        super(tireNumber, color, weight, speed);
        this.airConditioner = airConditioner;
        this.CD = CD;
        System.out.println("车的颜色为："+color+"，车重："+weight+",轮胎数为："+tireNumber+",当前速度为："+speed);
    }

    public void speedUp(){
        speed += 5;
        System.out.println("加速后的速度为："+speed);
    }

    public void speedDown(){
        speed -= 5;
        System.out.println("减速后速度为："+speed);
    }

}
